home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccssssccccaaaallll3333dddd,,,,zzzzssssccccaaaallll3333dddd((((3333FFFF)))) ccccssssccccaaaallll3333dddd,,,,zzzzssssccccaaaallll3333dddd((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ccccssssccccaaaallll3333dddd,,,, zzzzssssccccaaaallll3333dddd ---- scales a 3D complex sequence.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccssssccccaaaallll3333dddd(((( nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, llllaaaa1111,,,, llllaaaa2222))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll aaaallllpppphhhhaaaa
- ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzssssccccaaaallll3333dddd(((( nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, llllaaaa1111,,,, llllaaaa2222))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll****8888 aaaallllpppphhhhaaaa
- ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccssssccccaaaallll3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ffffllllooooaaaatttt aaaallllpppphhhhaaaa,,,,
- ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222))));;;;
- iiiinnnntttt zzzzssssccccaaaallll3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ddddoooouuuubbbblllleeee aaaallllpppphhhhaaaa,,,,
- zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ccccssssccccaaaallll3333dddd and zzzzssssccccaaaallll3333dddd scale a 3D complex sequence of size N1xN2xN3.
- The Fourier Transforms are not normalized so the succession Direct-
- Inverse transform scales the input data by a factor equal to the size of
- the transform. So ccccssssccccaaaallll3333dddd or zzzzssssccccaaaallll3333dddd may be used to scale back the
- result.
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN1111 Integer, the first dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN2222 Integer, the second dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN3333 Integer, the thrid dimension size of the 3D sequence. Unchanged on
- exit.
-
- AAAAllllpppphhhhaaaa scaling floating point value.
-
- AAAARRRRRRRRAAAAYYYY Array containing the samples of the 3D sequence to be transformed.
- On input, the element {i,j,k} of the sequence is stored as A(i,j,k) in
- _F_o_r_t_r_a_n , and A[i+j*la1+k*la1*la2] in _C.
- On exit, the array is overwritten.
-
- LLLLAAAA1111 Integer, first leading dimension: increment between the samples of
- two consecutive 1D sub-sequences (e.g between {i,j+1,k} and {i,j,k} ).
- Unchanged on exit.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccssssccccaaaallll3333dddd,,,,zzzzssssccccaaaallll3333dddd((((3333FFFF)))) ccccssssccccaaaallll3333dddd,,,,zzzzssssccccaaaallll3333dddd((((3333FFFF))))
-
-
-
- LLLLAAAA2222 Integer, second leading dimension: number of the 1D sub-sequence
- between two consecutive 2D sub-sequences (e.g between {i,j,k+1} and
- {i,j,k}). Unchanged on exit.
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- Given a 3D complex sequence of size 100x64x125. We successively apply a
- Direct Fourier Transform, an Inverse Fourier Transform and finally scale
- back the result by a factor 1/N (1/(100x64x125))-
- This succession DirectFFT-InverseFFT-Scaling is equivalent to the
- identity operator and the final sequence should be equal (with round-off
- precision) to the initial sequence.
- The offset between the first element of two succesive sub-sequence
- (leading dimension) is 2049.
- _F_o_r_t_r_a_n
- complex array(0:100-1,0:64-1,0:125-1)
- real alpha
- complex filter(0:100-1,0:64-1,0:125-1),
- complex coeff(100+15 + 64+15 + 125+15)
- call cfft3di( 100, 64, 125, coeff)
- call cfft3d( -1,100,64,125,array,100,64,coeff)
- call cfft3d( 1,100,64,125,array,100,64,coeff)
- alpha = 1. / real(100x64x125)
- call cscal3d( 100,64,125,alpha,array,100,64)
-
- _C
- #include <fft.h>
- complex array[100*64*125], *coeff;
- float alpha;
- coeff = cfft3di( 100, 64, 125, NULL);
- cfft3d( -1,100,64,125,array,100,64,coeff);
- cfft3d( 1,100,64,125,array,100,64,coeff);
- alpha = 1. / (float)(100x64x125)
- cscal3d( 100,64,125,alpha,array,100,64)
-
- NNNNOOOOTTTTEEEE____1111 :::: The Direct and Inverse transforms should use opposite signs -
- Which one is used (+1 or -1) for Direct transform is just a matter of
- convention-
-
- NNNNOOOOTTTTEEEE____2222 :::: The Fourier Transforms are not normalized so the succession
- Direct-Inverse transform scales the input data by a factor equal to the
- size of the transform.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, cfft3di, zfft3di, cfft3d, zfft3d, cprod3d, zprod3d
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-